<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/4/1
  Time: 14:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page errorPage="error.jsp" %>
<%@ page import="java.sql.*" %>

<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
    <%
      out.println("  <h1>HEllo world!</h1>\n");
    %>
  <%
        try{
            Class.forName("com.mysql.jdbc.Driver");
        }
        catch (ClassNotFoundException ee){
            System.out.println(ee.getMessage());
        }
        String DBDRIVER = "com.mysql.jdbc.Driver";
        String DBURL = "jdbc:mysql://localhost:3306/mldn";
        String DBUSER = "root";
        String DBPASS = "root";
        Connection conn = DriverManager.getConnection(DBURL,DBUSER,DBPASS);
        out.print("链接成功");
    %>
    <%
        conn.close();
    %>


  </body>
</html>
